package com.aid.winter.common.exception;

import com.aid.winter.common.enums.ResultCodeEnum;
import lombok.Getter;

@Getter
public class BusinessException extends RuntimeException {
    
    private final Integer code;
    
    public BusinessException(String message) {
        super(message);
        this.code = ResultCodeEnum.FAIL.getCode();
    }
    
    public BusinessException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getDesc());
        this.code = resultCodeEnum.getCode();
    }
    
    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
    }
} 